package com.yuan.blog.security;

import com.yuan.blog.dto.UserToken;
import org.apache.catalina.User;

/**
 * @program: blog-core
 * @description:
 * @author: yuan_boss
 * @create: 2023-01-05 09:25
 **/
public class UserTokenThreadLocal {
    private static ThreadLocal<UserToken> userTokenThreadLocal = new ThreadLocal<>();

    public static void set(UserToken userToken){
        userTokenThreadLocal.set(userToken);
    }
    public static UserToken get(){
        return userTokenThreadLocal.get();
    }
    public  static void remove(){
        userTokenThreadLocal.remove();
    }
}
